﻿using FunctionalCLR.Core;
using FunctionalCLR.Shell;

namespace Zove.Shell {
    public class ZoveShellUnaryFunctionFactory : 
        DefaultUnaryFunctionFactory {

        public ZoveShellUnaryFunctionFactory(IContext context)
            : base(context) {
        }

        #region IUnaryFunctionFactory Members

        public override UnaryFunctionTranslator CreateTranslator(string subject) {
            ZoveShellUnaryFunctionTranslator translator = new ZoveShellUnaryFunctionTranslator(
                base.Context.GetFunctionManager(), subject);
            translator.Context = base.Context as IZoveShellContext;

            return translator;
        }

        #endregion
    }
}
